package org.example.design.designmode.facadepattern.sellbubbles.facade;

//门面模式进行流程处理
public class MenuFacade {

    private  TouristService touristService= new TouristService();
    private StudentService studentService= new StudentService();
    private AdminService adminService = new AdminService();
    public void getmenuFacade(User u){

        if("Tourist".equals(u.getRole())){
            touristService.getjingpinke();
            touristService.getmaopao();
            touristService.getshangcheng();
            touristService.getwenda();
            touristService.getwenzhang();
            System.out.println(touristService.toString());
        }
        if("user".equals(u.getRole())){
            studentService.getjingpinke();
            studentService.getmaopao();
            studentService.getshangcheng();
            studentService.gettiku();
            studentService.getwenda();
            studentService.getwenzhang();
            studentService.getzuoye();
            System.out.println(touristService.toString());
        }
        if("admin".equals(u.getRole())){
            adminService.getjingpinke();
            adminService.getmaopao();
            adminService.getshangcheng();
            adminService.gettiku();
            adminService.getwenda();
            adminService.getzuoye();
            System.out.println(touristService.toString());

        }

    }
}
